Cover TOC Chap Prev Chap Prev Fig Next Fig Next Chap

Chapter 7: Scaling Shapes

../ch07/07fig11.gif
Figure 7.11

An archway with smaller archways on each side created in translated, scaled coordinate systems.

07fig11.wrl
Click on the image to view the VRML scene.

#VRML V2.0 utf8
# The VRML 2.0 Sourcebook
# Copyright (c) 1997
# Andrea L. Ames, David R. Nadeau, and John L. Moreland
Group {
    children [
    # Ground
        Shape {
            appearance DEF White Appearance {
                material Material { }
            }
            geometry Box {
                size 25.0 0.1 25.0
            }
        },
    # First archway
        DEF Archway Group {
            children [
            # Left Column
                DEF LeftColumn Transform {
                    translation -2.0 3.0 0.0
                    children DEF Column Shape {
                        appearance USE White
                        geometry Cylinder {
                            radius 0.3
                            height 6.0
                        }
                    }
                },
            # Right Column
                DEF RightColumn Transform {
                    translation 2.0 3.0 0.0
                    children USE Column
                },
            # Archway span
                DEF ArchwaySpan Transform {
                    translation 0.0 6.05 0.0
                    children Shape {
                        appearance USE White
                        geometry Box {
                            size 4.6 0.4 0.6
                        }
                    }
                },
            # Left Roof
                DEF LeftRoof Transform {
                    translation -1.15 7.12 0.0
                    rotation 0.0 0.0 1.0  0.524
                    children DEF Roof Shape {
                        appearance USE White
                        geometry Box {
                            size 2.86 0.4 0.6
                        }
                    }
                },
            # Right Roof
                DEF RightRoof Transform {
                    translation 1.15 7.12 0.0
                    rotation 0.0 0.0 1.0  -0.524
                    children USE Roof
                }
            ]
        },
    # Left small archway
        Transform {
            translation -4.0 0.0 0.0
            scale 0.5 0.5 0.5
            children USE Archway
        },
    # Right small archway
        Transform {
            translation 4.0 0.0 0.0
            scale 0.5 0.5 0.5
            children USE Archway
        }
    ]
}